<!-- @ftlvariable name="zknjProject" type="com.gxp.web.domain.ZknjProject" -->
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('Approve')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-approve-edit" th:object="${zknjProject}">
        <input name="proId" th:field="*{proId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">类别：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" th:field="*{approveType}" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">内容：</label>
            <div class="col-sm-8">
                <input id="detail" class="form-control" type="hidden" placeholder="详细信息" readonly>
                <div class="ms-parent" style="width: 100%;">
                    <div class="detail-drop animated flipInX" style="max-height:200px;overflow-y:auto">
                        <h4 class="form-header h4">项目详细信息</h4>
                        <label class="col-sm-3 control-label">名称：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="*{proName}"></label>
                        </div>
                        <label class="col-sm-3 control-label">描述：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${zknjProject.proDes == ''}?'-':${zknjProject.proDes}"></label>
                        </div>
                        <label class="col-sm-3 control-label">状态：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${zknjProject.isLock == 0}?'正常':'停用'"></label>
                        </div>
                        <label class="col-sm-3 control-label">开始日期：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${#dates.format(zknjProject.startTime, 'yyyy-MM-dd') == null}?'-':${#dates.format(zknjProject.startTime, 'yyyy-MM-dd')}"></label>
                        </div>
                        <label class="col-sm-3 control-label">结束日期：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${#dates.format(zknjProject.endTime, 'yyyy-MM-dd')==null}?'-':${#dates.format(zknjProject.endTime, 'yyyy-MM-dd')}"></label>
                        </div>
                        <label class="col-sm-3 control-label">分析经理：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${managers}"></label>
                        </div>
                        <label class="col-sm-3 control-label">分析员：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${requesters}"></label>
                        </div>
                        <label class="col-sm-3 control-label">仪器：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${instruments}"></label>
                        </div>
                        <label class="col-sm-3 control-label">服务：</label>
                        <div class="col-sm-8">
                            <label class="control-label" th:text="${services}"></label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">状态：</label>
            <div class="col-sm-8">
                <select class="form-control" name="proStatus">
                    <option th:value="${@dict.getValue('sys_appr_status','Pending approval')}" th:field="*{proStatus}">Pending approval</option>
                    <option th:value="${@dict.getValue('sys_appr_status','Approved')}" th:field="*{proStatus}">Approved</option>
                    <option th:value="${@dict.getValue('sys_appr_status','Not Approved')}" th:field="*{proStatus}">Not Approved</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">Comment：</label>
            <div class="col-sm-8">
                <input name="comment" class="form-control" type="text" th:field="*{comment}">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/project";
    $("#form-approve-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $('#form-approve-edit').serializeArray();
            $.operate.save(prefix + "/approve", data);
        }
    }
</script>
</body>
</html>